import request from '@/utils/request'

export const regAPI = obj => {
  return request.post('/api/reg', obj)
}
export const loginAPI = obj => {
  return request.post('/api/login', obj)
}

// 获取用户信息
export const getUserAPI = () => {
  return request.get('/my/userinfo')
}

export const updateUserAPI = data => {
  return request.put('/my/userinfo', data)
}
export const updatePassAPI = data => {
  return request.patch('/my/updatepwd', data)
}
export const updatePicAPI = data => {
  return request.patch('/my/update/avatar', { avatar: data })
}
